import AxiosServe from '../api/request.js'


/* 用户列表  */
export const RequestUserList = () => {
    return AxiosServe({
        url: '/api/list',
        method: 'get'
    })
}

/* 分页用户列表  */
export const RequestUserListPage = (pageNo,pageSize) => {
    return AxiosServe({
        url: '/api/list_page',
        method: 'get',
        params: {
            pageNo,
            pageSize
        }
    })
}

/* 删除用户根据uid */
export const RequestUserDelete = (id) => {
    return AxiosServe({
        url: '/api/delete',
        method: 'get',
        params: {
            uid: id
        }
    })
}

/* 添加用户 */
export const RequestUserAdd = (fromData)=>{
    return AxiosServe({
        url: '/api/add',
        method: 'post',
        headers: {'Content-Type':'multipart/form-data'},
        data: fromData
        
    })
}